function [w,b] = primalSVMbuilt(X,Y)

if (nargin < 2)
    error('Not enough arguments!');
end

[n,d] = size(X);
l = size(Y,1);
Xt = X(1:l,:);
H = eye(d+1,d+1);
H(d+1,d+1) = 0;
A = -[repmat(Y,1,d).*Xt,ones(l,1)];
bb = -ones(l,1);
disp('Training hard-margin svm...');
x = quadprog(H,[],A,bb,[],[]);
w = x(1:d);
b = x(d+1);
end